// eslint-disable-next-line no-unused-vars
import {getRequest,postRequest} from "@/utils/request";


/**
 *  用户登陆
 * @param url 登陆请求接口
 * @param params 参数
 * @returns {AxiosPromise}
 * @constructor
 */
export const getUserInfo = (userId) => {

    return getRequest(`/user/detail?id=${userId}`);
};

export const queryUserList = () => {
    return getRequest('/user/list');
};


export const selectName = (name) => {
    return getRequest(`/user/list?username=${name}` )
}

export const deleteUser = (params) => {
    return postRequest('/user/delete',params);
};
export const modifyUserInfo =(params) =>{
    return postRequest('/user/update',params);
};

export const getWhiteList = () => {
    return getRequest('/getWhiteList');
};

export const addWhite =(params) =>{
    return postRequest('/whiteListAdd',params);
};

export const modifyWhite =(params) =>{
    return postRequest('/whiteListUpdate',params);
};

export const deleteWhite =(params) =>{
    return postRequest('/whiteListDelete',params);
};